AR	=ar
AS	=as --32
LD	=ld -m elf_i386
LDFLAGS	=-s -x
CC	=gcc -march=i386
CFLAGS	=-Wall -O -m32 -fstrength-reduce -fomit-frame-pointer \
	-finline-functions -nostdinc -I../include
CPP	=gcc -E -nostdinc -I../include

.c.s:
	$(CC) $(CFLAGS) \
	-S -o $*.s $<
.s.o:
	$(AS) -o $*.o $<
.c.o:
	$(CC) $(CFLAGS) \
	-c -o $*.o $<

OBJS  = _exit.o errno.o

lib.a: $(OBJS)
	$(AR) rcs lib.a $(OBJS)
	sync

clean:
	rm -f core *.o *.a
	for i in *.c;do rm -f `basename $$i .c`.s;done
